Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Home Page #6065

Merged

Conversation

abbyhu2000
Copy link
Member

Description

This PR is built upon the original home page PR: #5613 authored by @BSFishy

Added a new commit on replacing the yml config with advanced setting.

Issues Resolved

resolves #6056

Screenshot

Screenshot 2024-03-07 at 11 42 16 AM

Testing the changes

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@abbyhu2000
Copy link
Member Author

Currently i placed the advanced setting under general section. Do we need to change any wording here? @kgcreative @ashwin-pc

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i just moved the location of the uisettings within the home plugin.

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 59.82906% with 47 lines in your changes are missing coverage. Please review.

Project coverage is 67.21%. Comparing base (8c4f49a) to head (f2f1146).
Report is 1 commits behind head on main.

Files Patch % Lines
.../home/public/services/section_type/section_type.ts 70.00% 12 Missing and 3 partials ⚠️
...on/components/homepage/sections/work_with_data.tsx 25.00% 9 Missing ⚠️
...tion/components/homepage/sections/learn_basics.tsx 30.00% 7 Missing ⚠️
src/plugins/home/public/plugin.ts 50.00% 4 Missing ⚠️
.../public/services/section_type/section_type.mock.ts 63.63% 4 Missing ⚠️
src/plugins/home/server/saved_objects/homepage.ts 25.00% 3 Missing ⚠️
...application/components/homepage/sections/utils.tsx 33.33% 2 Missing ⚠️
...ved_objects_management/public/register_services.ts 0.00% 1 Missing and 1 partial ⚠️
...gins/home/public/saved_homepage/_saved_homepage.ts 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6065      +/-   ##
==========================================
- Coverage   67.22%   67.21%   -0.01%     
==========================================
  Files        3333     3342       +9     
  Lines       64565    64681     +116     
  Branches    10391    10408      +17     
==========================================
+ Hits        43404    43476      +72     
- Misses      18628    18662      +34     
- Partials     2533     2543      +10     
Flag Coverage Δ
Linux_1 31.64% <8.24%> (-0.06%) ⬇️
Linux_2 55.45% <ø> (ø)
Linux_3 44.55% <8.51%> (-0.11%) ⬇️
Linux_4 35.09% <59.82%> (+0.10%) ⬆️
Windows_1 31.67% <8.24%> (-0.06%) ⬇️
Windows_2 55.41% <ø> (ø)
Windows_3 44.57% <8.51%> (-0.11%) ⬇️
Windows_4 35.09% <59.82%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ashwin-pc ashwin-pc self-assigned this Mar 8, 2024
@@ -28,7 +28,7 @@ on:

env:
TEST_REPO: ${{ inputs.test_repo != '' && inputs.test_repo || 'opensearch-project/opensearch-dashboards-functional-test' }}
TEST_BRANCH: "${{ inputs.test_branch != '' && inputs.test_branch || github.base_ref }}"
TEST_BRANCH: "${{ 'feature/new-home' || inputs.test_branch != '' && inputs.test_branch || github.base_ref }}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed back

@AMoo-Miki
Copy link
Collaborator

I would recommend using the changelog from main and adding the entry. The one here has too many changes and almost all are undesired.

Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for Miki's suggestion and the changelog conflict. Will approve once thats in.

@kgcreative
Copy link
Member

Cc: @lauralexis

@abbyhu2000 abbyhu2000 force-pushed the replace_toggle_with_advanced_setting branch 3 times, most recently from 532a468 to 99b7f29 Compare March 14, 2024 19:01
@abbyhu2000 abbyhu2000 force-pushed the replace_toggle_with_advanced_setting branch from 99b7f29 to 999f873 Compare March 14, 2024 19:02
BSFishy and others added 2 commits March 14, 2024 19:11
Signed-off-by: Matt Provost <[email protected]>

Add some things I for some reason didn't get in the initial commit

Signed-off-by: Matt Provost <[email protected]>

Add formatting line

Signed-off-by: Matt Provost <[email protected]>

Add doc comment explaining get homepage function

Signed-off-by: Matt Provost <[email protected]>

Remove unused function

Signed-off-by: Matt Provost <[email protected]>

Rename functions to more accurately describe what they do

Signed-off-by: Matt Provost <[email protected]>

WE HAVE RENDERING

Signed-off-by: Matt Provost <[email protected]>

Make some fixed/clarifications around the lazy rendering

Signed-off-by: Matt Provost <[email protected]>

Add basic layout for hero sections and sections

Signed-off-by: Matt Provost <[email protected]>

Set up proper section rendering

Signed-off-by: Matt Provost <[email protected]>

Add page layout

Signed-off-by: Matt Provost <[email protected]>

Add homepage saved object edit button

Signed-off-by: Matt Provost <[email protected]>

Memoize section content

Signed-off-by: Matt Provost <[email protected]>

Add data section

Signed-off-by: Matt Provost <[email protected]>

Add learn basics section

Signed-off-by: Matt Provost <[email protected]>

Small cleanup things

Signed-off-by: Matt Provost <[email protected]>

Misc changes

Signed-off-by: Matt Provost <[email protected]>

Remove custom card display

Signed-off-by: Matt Provost <[email protected]>

Fix breadcrumbs not updating

Signed-off-by: Matt Provost <[email protected]>

Add small todo comment

Signed-off-by: Matt Provost <[email protected]>

Inline section rendering

Signed-off-by: Matt Provost <[email protected]>

Fix section type service mock

Signed-off-by: Matt Provost <[email protected]>

Fix jest tests

Signed-off-by: Matt Provost <[email protected]>

Fix the test mocks

Signed-off-by: Matt Provost <[email protected]>

Add throw tests

Signed-off-by: Matt Provost <[email protected]>

Remove default hero section

Signed-off-by: Matt Provost <[email protected]>

Add a few more tests

Signed-off-by: Matt Provost <[email protected]>

Add footer

Signed-off-by: Matt Provost <[email protected]>

Fix some of the testing

Signed-off-by: Matt Provost <[email protected]>

Add homepage saved object test

Signed-off-by: Matt Provost <[email protected]>

Add basic getHomepage test

Signed-off-by: Matt Provost <[email protected]>

Remove copilot comments

Signed-off-by: Matt Provost <[email protected]>

Add some more tests to ensure functionality is as intended

Signed-off-by: Matt Provost <[email protected]>

Remove unused file

Signed-off-by: Matt Provost <[email protected]>

Add test subjects

Signed-off-by: Matt Provost <[email protected]>

Update changelog

Signed-off-by: Matt Provost <[email protected]>

Update with guidance from UX

Signed-off-by: Matt Provost <[email protected]>

Convert homepage to use observables

Signed-off-by: Matt Provost <[email protected]>

Add doc comment

Signed-off-by: Matt Provost <[email protected]>

Finish functionality for observable based homepage

Signed-off-by: Matt Provost <[email protected]>

Rename heros to heroes

Signed-off-by: Matt Provost <[email protected]>

Update footer i18n ids

Signed-off-by: Matt Provost <[email protected]>

Extract layout into its own component

Signed-off-by: Matt Provost <[email protected]>

Make the new home experience configurable

Signed-off-by: Matt Provost <[email protected]>

Move all legacy home stuff into legacy folder

Signed-off-by: Matt Provost <[email protected]>

Update loading and error designs

Signed-off-by: Matt Provost <[email protected]>

Change from Webpack import to file path

Signed-off-by: Matt Provost <[email protected]>

Add config value for disabling new homepage

Signed-off-by: Matt Provost <[email protected]>

Reverse list

Signed-off-by: Matt Provost <[email protected]>

Redo some of the comments

Signed-off-by: Matt Provost <[email protected]>

Remove old todo comment

Signed-off-by: Matt Provost <[email protected]>

Add welcome screen & branding & fix tests

Signed-off-by: Matt Provost <[email protected]>

Make new homepage disabled by default

Signed-off-by: Matt Provost <[email protected]>

Change disable homepage behavior

Signed-off-by: Matt Provost <[email protected]>

Change some names around

Signed-off-by: Matt Provost <[email protected]>

Add back recently accessed

Signed-off-by: Matt Provost <[email protected]>

Reduce weight of ingestion image

Signed-off-by: Matt Provost <[email protected]>

Minor comment addressing

Signed-off-by: Matt Provost <[email protected]>

Update learn section with UX feedback

Signed-off-by: Matt Provost <[email protected]>

Small redesign cleanup

Signed-off-by: Matt Provost <[email protected]>

Fix useShowWelcome semantics

Signed-off-by: Matt Provost <[email protected]>

Actually fix show welcome this time

Signed-off-by: Matt Provost <[email protected]>

Rename config option

Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: abbyhu2000 <[email protected]>

delete workflow change

Signed-off-by: abbyhu2000 <[email protected]>
@abbyhu2000 abbyhu2000 force-pushed the replace_toggle_with_advanced_setting branch from 999f873 to df345e1 Compare March 14, 2024 19:12
Signed-off-by: abbyhu2000 <[email protected]>
@abbyhu2000 abbyhu2000 force-pushed the replace_toggle_with_advanced_setting branch from df345e1 to d83f5a2 Compare March 14, 2024 19:17
@abbyhu2000
Copy link
Member Author

Should add some fallback mechanism if getting the new home page failed. #6146

@ananzh
Copy link
Member

ananzh commented Mar 15, 2024

Thanks for the great work @BSFishy @abbyhu2000

@ananzh ananzh merged commit d1dd85b into opensearch-project:main Mar 15, 2024
70 of 71 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 15, 2024
This pull request introduces a comprehensive update to the homepage, focusing on enhancing its layout, functionality, and configurability. Key changes include:

* Initial implementation and iterative improvements of the new homepage layout, including the addition of hero sections and various other sections for improved content organization and presentation.
* Introduction of lazy rendering and memoization to optimize performance and user experience.
* Refinements in section rendering, including inline rendering, to streamline the page's structure and interactivity.
* Removal of unused functions and components, alongside renaming functions for better clarity and alignment with their purpose.
* Significant enhancements in testing, ensuring robust functionality through the addition of various unit tests, including jest tests and tests for new observable-based features.
* Adjustments and updates following UX guidance, including changes to the footer, welcome screen, and other user interface elements to align with best practices and user expectations.
* Conversion of the homepage to use observables for dynamic content updates, and making the new homepage experience configurable, allowing for easy toggling between legacy and new layouts.
* Comprehensive cleanup and minor redesign efforts to refine the overall look and feel, alongside the removal of outdated comments and redundant code.
* Introduction of a new configuration option to enable/disable the new homepage, providing flexibility and control to users or administrators.
* Additional contributions include replacing a YAML config with an advanced setting and fixing the changelog for accurate documentation.

---------

Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: abbyhu2000 <[email protected]>
Signed-off-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Matt Provost <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
(cherry picked from commit d1dd85b)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
ashwin-pc pushed a commit that referenced this pull request Mar 18, 2024
This pull request introduces a comprehensive update to the homepage, focusing on enhancing its layout, functionality, and configurability. Key changes include:

* Initial implementation and iterative improvements of the new homepage layout, including the addition of hero sections and various other sections for improved content organization and presentation.
* Introduction of lazy rendering and memoization to optimize performance and user experience.
* Refinements in section rendering, including inline rendering, to streamline the page's structure and interactivity.
* Removal of unused functions and components, alongside renaming functions for better clarity and alignment with their purpose.
* Significant enhancements in testing, ensuring robust functionality through the addition of various unit tests, including jest tests and tests for new observable-based features.
* Adjustments and updates following UX guidance, including changes to the footer, welcome screen, and other user interface elements to align with best practices and user expectations.
* Conversion of the homepage to use observables for dynamic content updates, and making the new homepage experience configurable, allowing for easy toggling between legacy and new layouts.
* Comprehensive cleanup and minor redesign efforts to refine the overall look and feel, alongside the removal of outdated comments and redundant code.
* Introduction of a new configuration option to enable/disable the new homepage, providing flexibility and control to users or administrators.
* Additional contributions include replacing a YAML config with an advanced setting and fixing the changelog for accurate documentation.

---------

Signed-off-by: Matt Provost <[email protected]>
Signed-off-by: abbyhu2000 <[email protected]>
Signed-off-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Matt Provost <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
(cherry picked from commit d1dd85b)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add toggle for switching between new homepage and legacy homepage
7 participants